const commonData = {
  namespaced: true,
  state: {
    userInfo: null, // 用户信息
    isOnQuanUBase: false, // 是否在移动应用平台app中
    headerBarHeight: 0 // h5头部导航栏高度
  },
  mutations: {
    updateUserInfo(state: { userInfo: unknown }, data: unknown): void {
      state.userInfo = data
    },
    updateQuanUBase(state: { isOnQuanUBase: boolean }, data: boolean): void {
      state.isOnQuanUBase = data
    },
    updateHeaderBarHeight(state: { headerBarHeight: number }, data: number): void {
      state.headerBarHeight = data
    }
  },
  getters: {
    userInfo(state: { userInfo: unknown }): unknown {
      return state.userInfo
    },
    isOnQuanUBase(state: { isOnQuanUBase: boolean }): boolean {
      return state.isOnQuanUBase
    },
    headerBarHeight(state: { headerBarHeight: number }): number {
      return state.headerBarHeight
    }
  }
}
export default commonData
